
namespace("core::Application", {
    name : "A Javascript Environment",
    
    preInitialize : function preInitialize(){
        var args = arguments;
//        window.addEvent("domready", function(){
//		    this.initialize.apply(this, args);
//	    }.bind(this));
        this.initialize.apply(this, args);        
    },
    
    initialize : function initialize(){
            
        window.application = this;
    },
    
    add : function add(htmlControl){
        var el = Object.isElement(htmlControl) ? htmlControl:htmlControl.element;
        document.body.appendChild(el);
    }
});

new core.Application();
